<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateOperateLogsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('operate_logs', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('log')->nullable();
			$table->integer('operatorable_id')->nullable();
			$table->string('operatorable_type')->nullable();
			$table->integer('logable_id')->nullable();
			$table->string('logable_type')->nullable();
			$table->integer('log_type_id')->nullable();
			$table->string('remark')->nullable();
			$table->text('json_data', 65535)->nullable()->comment('额外的json数据');
			$table->string('ip', 120)->nullable()->comment('IP地址');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('operate_logs');
	}

}
